<%@page import="librerias.Explode"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page import="java.util.ArrayList" %>
<%@ page import="entidades.Materia" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<link rel="stylesheet" href="/css/style.css" type="text/css">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Sistema de gestion Academia- Inscripcion materia</title>
</head>
<body>
<%
//si esta logeado
if(session.getAttribute("currentSessionUser") != null){
	session.setAttribute("paginaActiva", "Inscripcion");
%>

<%@ include file = "estructura/Header.jsp" %>

<div id="main">
	
	<%@ include file = "estructura/MenuAlumno.jsp" %>
		
	<div id="content">
	<h1>INSCRIPCIONES</h1><br>
		<table>
			<tr>
			<th>ID</th>
			<th>Descripción</th>
			<th>HS Semanales</th>
			<th>hs Totales</th>
			<th>ID Plan</th>
			<th>Nombre. Plan</th>
			<th>Insc.</th>
			
			</tr>
	
			<tr>
			<%
			if(request.getAttribute("materiasInscripcion") != null){
				ArrayList<Materia> listaMaterias = new ArrayList<Materia>();
				listaMaterias = (ArrayList<Materia>)request.getAttribute("materiasInscripcion");
				for(Materia materia: listaMaterias){
		%>
					<td>
		<%	
				out.println(materia.getId() + "</td>");
		%>
					<td>
		<%	
				out.println(materia.getDescripcion() + "</td>");
		%>
					<td>
		<%	
				out.println(materia.getHsSemanales() + "</td>");
		%>
					<td>
		<%	
				out.println(materia.getHsTotales() + "</td>");
		%>
					<td>
		<%	
				out.println(materia.getIdPlan() + "</td>");
		%>
					<td>
		<%	
				out.println(materia.getNombrePlan() + "</td>");
		%>
			<td ><form  action="OpcionesAlumnos" method="get" enctype="multipart/form-data" name="form"><input name="o" id="o" type="hidden"  value="77"><input name="idm"  type="hidden"  value="<%=materia.getId()%>"><input name="boton" id="boton" value="Ver Comisiones" type="submit"></form></td>
			</tr>
			
			
			<%
				}
			}
		%>	
			</table>
			
	</div>
</div>
<%@ include file = "estructura/Footer.jsp" %>

<%}else{ //no logueado, se redirecciona a login%>



<meta http-equiv="refresh" content="0;URL=Login.jsp">

</html>
<%}%>